/**
 * 
 */
package cyclopean.world;

import cyclopean.Paths;

// TODO Javadoc
/**
 * 
 *
 * @author Jaco van der Westhuizen
 */
public class BlockType
{
	static final int X_COUNT = 16;
	static final int Y_COUNT = 16;
	static final int MAX_COUNT = X_COUNT * Y_COUNT;

	static final boolean[] isTrans = new boolean[MAX_COUNT];
	static final boolean[] isPass  = new boolean[MAX_COUNT];

	public static final BlockType AIR  = new BlockType((byte)  0, true,  true,  null);
	public static final BlockType DIRT = new BlockType((byte)  1, false, false, "dirt.png");
	
	public final byte id;

	private BlockType(byte id, boolean isTranslucent, boolean isPassable, String fileName)
	{
		this.id = id;
		
    	isTrans[id] = isTranslucent;
    	isPass[id] = isPassable;

    	if (fileName != null)
    		ZoneRenderer.addBlockType(id, Paths.TEXTURES + fileName);
	}
}
